import { _decorator } from "cc";
import { ecs } from "db://oops-framework/libs/ecs/ECS";
import { MovementComponent } from "db://assets/script/game/demo/ecs/cocos/component/MovementComponent";
import { ECSComp } from "db://oops-framework/libs/ecs/ECSComp";

const {ccclass, property} = _decorator;

@ccclass('Player')
@ecs.register('Player', false)
export class Player extends ecs.Comp {
    @property({
        type: MovementComponent
    })
    movement!: MovementComponent;

    onLoad() {
        // 添加MovementComponent组件对象
        this.ent.add(this.movement);
    }

    reset(): void {
    }
}
